
#include <system_log.h>
#include <ff_plugin.h>

FFSdkUnity::Plugin g_plugin{};

// Unity interface functions
// https://docs.unity3d.com/Manual/NativePluginInterface.html

extern "C" {

void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces *interfaces)
{
    if (!interfaces) {
        FFLOGD("UnityPluginLoad - interfaces is nullptr!");
        return;
    }
    g_plugin.Init(*interfaces);
}

void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload()
{
    g_plugin.Destroy();
}

} // extern "C"
